<template>
  <div class="nav">
    <router-link to="/goods" class="nav-item">
      点餐
      <i class="line"></i>
    </router-link>
    <router-link to="/comments" class="nav-item">
      评价
      <i class="line"></i>
    </router-link>
    <router-link to="/seller" class="nav-item">
      商家
      <i class="line"></i>
    </router-link>
  </div>
</template>

<script>
export default {
  name: "NavBar",
};
</script>

<style scoped>
.nav{
    display: flex;
    width: 100%;
    line-height: 10.66666vw;
    border-bottom: 1px solid #e4e4e4;
    background-color: #fff;
    position: sticky;
    top: 0px;
    z-index: 10;
}
.nav .nav-item{
    flex: 1;
    text-align: center;
    font-size: 0.95rem;
    text-decoration: none;
    color: #666;
    position: relative;
}
.nav .active{
  color: #333;
  font-weight: 700;
}
.nav .active .line{
  width: 60px;
  height: 0.533333vw;
  background-color: #2395ff;
  position: absolute;
  left: 34%;
  bottom: 0;
  margin-left: -10px;
}
</style>
      